<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>QCNSim: Link Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">QCNSim
   </div>
   <div id="projectbrief">Simulator for Quake-Catcher Network</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="class_link-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Link Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_link.html" title="Link class. ">Link</a> class.  
 <a href="class_link.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_link_8h_source.html">Link.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Link:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_link.png" usemap="#Link_map" alt=""/>
  <map id="Link_map" name="Link_map">
<area href="class_entity.html" title="Entity class. " alt="Entity" shape="rect" coords="44,0,122,24"/>
<area href="class_duplex_link.html" title="DuplexLink class. " alt="DuplexLink" shape="rect" coords="0,112,78,136"/>
<area href="class_simplex_link.html" title="SimplexLink class. " alt="SimplexLink" shape="rect" coords="88,112,166,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af485c0065bf1fdc5c296b45f6ef96fd3"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#af485c0065bf1fdc5c296b45f6ef96fd3">getNodeA</a> () const </td></tr>
<tr class="memdesc:af485c0065bf1fdc5c296b45f6ef96fd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return pointer to nodeA (one side of link).  <a href="#af485c0065bf1fdc5c296b45f6ef96fd3">More...</a><br/></td></tr>
<tr class="separator:af485c0065bf1fdc5c296b45f6ef96fd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb8020ddc851ceb0bf5dba01182d688c"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#adb8020ddc851ceb0bf5dba01182d688c">getNodeB</a> () const </td></tr>
<tr class="memdesc:adb8020ddc851ceb0bf5dba01182d688c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return pointer to nodeB (another side of link).  <a href="#adb8020ddc851ceb0bf5dba01182d688c">More...</a><br/></td></tr>
<tr class="separator:adb8020ddc851ceb0bf5dba01182d688c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2cafc5931128c3a03ac50fa283e9c18f"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a2cafc5931128c3a03ac50fa283e9c18f">getBandwidth</a> () const </td></tr>
<tr class="memdesc:a2cafc5931128c3a03ac50fa283e9c18f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return reference to nodeA.  <a href="#a2cafc5931128c3a03ac50fa283e9c18f">More...</a><br/></td></tr>
<tr class="separator:a2cafc5931128c3a03ac50fa283e9c18f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6f3bcc6896090d2b0ab665c0fedbf17"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ab6f3bcc6896090d2b0ab665c0fedbf17">getPropagationDelay</a> () const </td></tr>
<tr class="memdesc:ab6f3bcc6896090d2b0ab665c0fedbf17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return propagation delay or latency of link.  <a href="#ab6f3bcc6896090d2b0ab665c0fedbf17">More...</a><br/></td></tr>
<tr class="separator:ab6f3bcc6896090d2b0ab665c0fedbf17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0d2091b3406725300be167b82216552"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ad0d2091b3406725300be167b82216552">getName</a> () const </td></tr>
<tr class="memdesc:ad0d2091b3406725300be167b82216552"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return name of link.  <a href="#ad0d2091b3406725300be167b82216552">More...</a><br/></td></tr>
<tr class="separator:ad0d2091b3406725300be167b82216552"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f1d8f13ecc78be10812fa1d78670339"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a3f1d8f13ecc78be10812fa1d78670339">isUp</a> () const </td></tr>
<tr class="memdesc:a3f1d8f13ecc78be10812fa1d78670339"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if link is up; false otherwise. This status is the direct status of underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a>.  <a href="#a3f1d8f13ecc78be10812fa1d78670339">More...</a><br/></td></tr>
<tr class="separator:a3f1d8f13ecc78be10812fa1d78670339"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeba26f0ab710ff765646e669a60ac682"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83af">LinkReturnType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#aeba26f0ab710ff765646e669a60ac682">transmitPDU</a> (<a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> transmitEventType, <a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> endTransmitEventType, std::shared_ptr&lt; const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; pdu)</td></tr>
<tr class="memdesc:aeba26f0ab710ff765646e669a60ac682"><td class="mdescLeft">&#160;</td><td class="mdescRight">Requests transmission a PDU to (or through) the link.  <a href="#aeba26f0ab710ff765646e669a60ac682">More...</a><br/></td></tr>
<tr class="separator:aeba26f0ab710ff765646e669a60ac682"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb8a206db623b733b98bb5866335b19f"><td class="memItemLeft" align="right" valign="top">virtual std::list<br class="typebreak"/>
&lt; std::shared_ptr&lt; const <br class="typebreak"/>
<a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;<br class="typebreak"/>
 &gt;::size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#abb8a206db623b733b98bb5866335b19f">getInTransitQueueSize</a> () const </td></tr>
<tr class="memdesc:abb8a206db623b733b98bb5866335b19f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current PDU in-transit queue size.  <a href="#abb8a206db623b733b98bb5866335b19f">More...</a><br/></td></tr>
<tr class="separator:abb8a206db623b733b98bb5866335b19f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94f1e68ad68a9ebd10fae43a531347d4"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83af">LinkReturnType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a94f1e68ad68a9ebd10fae43a531347d4">propagatePDU</a> (<a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> nextEvent, std::shared_ptr&lt; const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; pdu)</td></tr>
<tr class="memdesc:a94f1e68ad68a9ebd10fae43a531347d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ends transmission (release PDU from <a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) and propagate PDU through this link.  <a href="#a94f1e68ad68a9ebd10fae43a531347d4">More...</a><br/></td></tr>
<tr class="separator:a94f1e68ad68a9ebd10fae43a531347d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9f5b6b14f9f191421c7e131ccb288ea"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#aa9f5b6b14f9f191421c7e131ccb288ea">isTransmissionServerBusy</a> () const </td></tr>
<tr class="separator:aa9f5b6b14f9f191421c7e131ccb288ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab122159183081cdeb5f7b8947f62b9a7"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ab122159183081cdeb5f7b8947f62b9a7">endPropagation</a> (std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; pdu)</td></tr>
<tr class="memdesc:ab122159183081cdeb5f7b8947f62b9a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">PDU has successfully propagated through the link; end propagation.  <a href="#ab122159183081cdeb5f7b8947f62b9a7">More...</a><br/></td></tr>
<tr class="separator:ab122159183081cdeb5f7b8947f62b9a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a297af435322be39d8562091688c460a7"><td class="memItemLeft" align="right" valign="top">virtual std::list<br class="typebreak"/>
&lt; <a class="el" href="class_facility_queue_element.html">FacilityQueueElement</a> &gt;<br class="typebreak"/>
::size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a297af435322be39d8562091688c460a7">getTransmissionQueueSize</a> () const </td></tr>
<tr class="memdesc:a297af435322be39d8562091688c460a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size.  <a href="#a297af435322be39d8562091688c460a7">More...</a><br/></td></tr>
<tr class="separator:a297af435322be39d8562091688c460a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ae26f20287944d54c2db9d12b56f28d"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a3ae26f20287944d54c2db9d12b56f28d">getMaxRecordedTransmissionQueueSize</a> () const </td></tr>
<tr class="memdesc:a3ae26f20287944d54c2db9d12b56f28d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) max recorded queue size.  <a href="#a3ae26f20287944d54c2db9d12b56f28d">More...</a><br/></td></tr>
<tr class="separator:a3ae26f20287944d54c2db9d12b56f28d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab93be277b905f1bd1746d649ebb4461d"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ab93be277b905f1bd1746d649ebb4461d">getTransmissionQueueSizeLimit</a> () const </td></tr>
<tr class="memdesc:ab93be277b905f1bd1746d649ebb4461d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size limit.  <a href="#ab93be277b905f1bd1746d649ebb4461d">More...</a><br/></td></tr>
<tr class="separator:ab93be277b905f1bd1746d649ebb4461d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0866e5df549e6c3d83c0247d098d4ab0"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a0866e5df549e6c3d83c0247d098d4ab0">getDroppedPdusCountTransmissionServer</a> () const </td></tr>
<tr class="separator:a0866e5df549e6c3d83c0247d098d4ab0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5d1051d4f63ff9018fd4d6f5848dcf1"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#af5d1051d4f63ff9018fd4d6f5848dcf1">getDroppedPdusCountMedium</a> () const </td></tr>
<tr class="separator:af5d1051d4f63ff9018fd4d6f5848dcf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a194c6afd1182f7543ebd50f859b86123"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a194c6afd1182f7543ebd50f859b86123">getDroppedPdusCountWholeLink</a> () const </td></tr>
<tr class="separator:a194c6afd1182f7543ebd50f859b86123"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57170d6e8669a32107794b0a2cc98890"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a57170d6e8669a32107794b0a2cc98890">setUp</a> ()</td></tr>
<tr class="memdesc:a57170d6e8669a32107794b0a2cc98890"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set <a class="el" href="class_link.html" title="Link class. ">Link</a> up.  <a href="#a57170d6e8669a32107794b0a2cc98890">More...</a><br/></td></tr>
<tr class="separator:a57170d6e8669a32107794b0a2cc98890"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe69b641a7b52cdc830307dfcd9e8af3"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#afe69b641a7b52cdc830307dfcd9e8af3">setDown</a> ()</td></tr>
<tr class="memdesc:afe69b641a7b52cdc830307dfcd9e8af3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set <a class="el" href="class_link.html" title="Link class. ">Link</a> down.  <a href="#afe69b641a7b52cdc830307dfcd9e8af3">More...</a><br/></td></tr>
<tr class="separator:afe69b641a7b52cdc830307dfcd9e8af3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af64db4e49ef26c305b301db2ae318244"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#af64db4e49ef26c305b301db2ae318244">setTransmissionQueueSizeLimit</a> (unsigned int limit)</td></tr>
<tr class="memdesc:af64db4e49ef26c305b301db2ae318244"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size limit.  <a href="#af64db4e49ef26c305b301db2ae318244">More...</a><br/></td></tr>
<tr class="separator:af64db4e49ef26c305b301db2ae318244"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_entity"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_entity')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_entity.html">Entity</a></td></tr>
<tr class="memitem:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entity.html#ac2da1e8a32161accc56f39ac52cebd86">~Entity</a> ()=0</td></tr>
<tr class="memdesc:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make this abstract (pure virtual), cannot be instantiated.  <a href="#ac2da1e8a32161accc56f39ac52cebd86">More...</a><br/></td></tr>
<tr class="separator:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aaaf840f77f9ad3f577a6746fd30c8577"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#aaaf840f77f9ad3f577a6746fd30c8577">Link</a> (std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; <a class="el" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a>, std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; <a class="el" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>, double <a class="el" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>, double <a class="el" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>, <a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;<a class="el" href="class_link.html#a0f55fbe50f26e0c9d0469e3300584870">simulatorGlobals</a>, <a class="el" href="class_scheduler.html">Scheduler</a> &amp;<a class="el" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a>, const std::string &amp;<a class="el" href="class_link.html#a3175152212d21764b83996c540617838">name</a>=&quot;&quot;)</td></tr>
<tr class="memdesc:aaaf840f77f9ad3f577a6746fd30c8577"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#aaaf840f77f9ad3f577a6746fd30c8577">More...</a><br/></td></tr>
<tr class="separator:aaaf840f77f9ad3f577a6746fd30c8577"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d8007c08641925ab31385d28cb0f39e"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a4d8007c08641925ab31385d28cb0f39e">~Link</a> ()=0</td></tr>
<tr class="memdesc:a4d8007c08641925ab31385d28cb0f39e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a4d8007c08641925ab31385d28cb0f39e">More...</a><br/></td></tr>
<tr class="separator:a4d8007c08641925ab31385d28cb0f39e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:afc5d6ab142420b803c1f9802ad0199f5"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a></td></tr>
<tr class="memdesc:afc5d6ab142420b803c1f9802ad0199f5"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_node.html" title="Node class. ">Node</a> at one side of the link.  <a href="#afc5d6ab142420b803c1f9802ad0199f5">More...</a><br/></td></tr>
<tr class="separator:afc5d6ab142420b803c1f9802ad0199f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7a426a53a41d26351c85cb2cea50d60"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a></td></tr>
<tr class="memdesc:af7a426a53a41d26351c85cb2cea50d60"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_node.html" title="Node class. ">Node</a> at the other side of the link.  <a href="#af7a426a53a41d26351c85cb2cea50d60">More...</a><br/></td></tr>
<tr class="separator:af7a426a53a41d26351c85cb2cea50d60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff4506be6c9b62b335e3a389a01969ef"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a></td></tr>
<tr class="memdesc:aff4506be6c9b62b335e3a389a01969ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bandwidth of this link, typically in bits per second.  <a href="#aff4506be6c9b62b335e3a389a01969ef">More...</a><br/></td></tr>
<tr class="separator:aff4506be6c9b62b335e3a389a01969ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31855f1eaf9c6562f1dc2067d475dd4d"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a></td></tr>
<tr class="memdesc:a31855f1eaf9c6562f1dc2067d475dd4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Propagation delay of this link, which is medium-dependent, typically in seconds.  <a href="#a31855f1eaf9c6562f1dc2067d475dd4d">More...</a><br/></td></tr>
<tr class="separator:a31855f1eaf9c6562f1dc2067d475dd4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3175152212d21764b83996c540617838"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a3175152212d21764b83996c540617838">name</a></td></tr>
<tr class="memdesc:a3175152212d21764b83996c540617838"><td class="mdescLeft">&#160;</td><td class="mdescRight">Name of this link.  <a href="#a3175152212d21764b83996c540617838">More...</a><br/></td></tr>
<tr class="separator:a3175152212d21764b83996c540617838"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53ed79d4f4d927e120d0cbfa00158089"><td class="memItemLeft" align="right" valign="top">std::list&lt; std::shared_ptr<br class="typebreak"/>
&lt; const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a></td></tr>
<tr class="memdesc:a53ed79d4f4d927e120d0cbfa00158089"><td class="mdescLeft">&#160;</td><td class="mdescRight">Queue for PDUs in transit (in propagation) in this link.  <a href="#a53ed79d4f4d927e120d0cbfa00158089">More...</a><br/></td></tr>
<tr class="separator:a53ed79d4f4d927e120d0cbfa00158089"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f55fbe50f26e0c9d0469e3300584870"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a0f55fbe50f26e0c9d0469e3300584870">simulatorGlobals</a></td></tr>
<tr class="memdesc:a0f55fbe50f26e0c9d0469e3300584870"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object.  <a href="#a0f55fbe50f26e0c9d0469e3300584870">More...</a><br/></td></tr>
<tr class="separator:a0f55fbe50f26e0c9d0469e3300584870"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad60d0e445f4593579b62a3c2ecd1fa75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_scheduler.html">Scheduler</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a></td></tr>
<tr class="memdesc:ad60d0e445f4593579b62a3c2ecd1fa75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object.  <a href="#ad60d0e445f4593579b62a3c2ecd1fa75">More...</a><br/></td></tr>
<tr class="separator:ad60d0e445f4593579b62a3c2ecd1fa75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe44953f8653b44f2b914daa0bb6bcdc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_facility.html">Facility</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a></td></tr>
<tr class="memdesc:abe44953f8653b44f2b914daa0bb6bcdc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transmission server for this <a class="el" href="class_link.html" title="Link class. ">Link</a> (one-way).  <a href="#abe44953f8653b44f2b914daa0bb6bcdc">More...</a><br/></td></tr>
<tr class="separator:abe44953f8653b44f2b914daa0bb6bcdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71c43c39d94c9b8b95d1810b5c7d17ac"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a></td></tr>
<tr class="memdesc:a71c43c39d94c9b8b95d1810b5c7d17ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count of dropped PDUs by this link's medium.  <a href="#a71c43c39d94c9b8b95d1810b5c7d17ac">More...</a><br/></td></tr>
<tr class="separator:a71c43c39d94c9b8b95d1810b5c7d17ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:aa2abd35db916156b8204655f89df6e3a"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_link.html#aa2abd35db916156b8204655f89df6e3a">purgeQueue</a> ()</td></tr>
<tr class="memdesc:aa2abd35db916156b8204655f89df6e3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Purge inTransitQueue, update statistics, return number of dropped PDUs from link medium.  <a href="#aa2abd35db916156b8204655f89df6e3a">More...</a><br/></td></tr>
<tr class="separator:aa2abd35db916156b8204655f89df6e3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_link.html" title="Link class. ">Link</a> class. </p>
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>October 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </dd></dl>
<dl class="section user"><dt>Description</dt><dd>A <a class="el" href="class_link.html" title="Link class. ">Link</a> connects two <a class="el" href="class_node.html" title="Node class. ">Node</a> objects.</dd></dl>
<p>Typically, a <a class="el" href="class_link.html" title="Link class. ">Link</a> can be simplex (one-way) or duplex (two-way). A duplex link is basically two simplex links, one opposite to the other in node direction; the other parameters are common.</p>
<p>Internally, a link has a <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> object with one server. The facility transmits the PDU with speed proportional to the bandwidth, i.e., transmission time = packet size / bandwidth. After transmission, the PDU is propagated through the link, with time delay = propagation delay or latency. The propagation delay is medium-dependent. Fiber optics is a faster medium than copper. Propagation delay is proportional to the distance between the nodes and the speed of light (or electrons) in the medium. Propagation delay is a fixed time delay, defined when creating the link, and models an infinite capacity server from Queuing Theory.</p>
<p>Conceptually, a link will forward a PDU in two stages, with an event for each: transmission, and propagation. If a link goes down, all PDUs currently in transmission queue and in propagation queue or transit queue. Hence, there are two queues here: one from the transmission <a class="el" href="class_facility.html" title="Facility class. ">Facility</a>, and one from the propagation delay center. Naturally, if a link has a high bandwidth-delay-product, there can be many PDUs in transit within the link at the same time.</p>
<p>The link is modelled with a <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> with one server, acting as the transmission server. The service time is a function of the link bandwidth and PDU size, such that:</p>
<p>service_time = PDU_size / bandwidth</p>
<p>Connected to the output of the transmission server, there is a delay center or infinite capacity server. This delay center models the propagation delay of the link. The complete handling of a PDU through a link will be composed of three events:</p>
<ol type="1">
<li>REQUEST_PDU_TRANSMISSION_AT_LINK: if successful, the next END_TRANSMISSION_PROPAGATE_PDU_AT_LINK event must be scheduled for the link. Otherwise, the PDU was probably enqueued or dropped.</li>
<li>END_TRANSMISSION_PROPAGATE_PDU_AT_LINK: if the previous event was successful, this event is scheduled. This event will cause the <a class="el" href="class_link.html" title="Link class. ">Link</a> transmission server to release the PDU and then the PDU will commence propagation in the link. This is done by scheduling a PDUTOKEN_ARRIVAL_AT_NODE after the fixed-time propagation delay.</li>
<li>PDUTOKEN_ARRIVAL_AT_NODE: scheduled after transmission and release of PDU from <a class="el" href="class_link.html" title="Link class. ">Link</a>'s transmission server. At this event, the PDU has arrived at the destination node. </li>
</ol>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00064">64</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aaaf840f77f9ad3f577a6746fd30c8577"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Link::Link </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td>
          <td class="paramname"><em>nodeA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt;&#160;</td>
          <td class="paramname"><em>nodeB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>bandwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>propagationDelay</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td>
          <td class="paramname"><em>simulatorGlobals</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_scheduler.html">Scheduler</a> &amp;&#160;</td>
          <td class="paramname"><em>scheduler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>October 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nodeA</td><td>Pointer to <a class="el" href="class_node.html" title="Node class. ">Node</a> at one side of the link. </td></tr>
    <tr><td class="paramname">nodeB</td><td>Pointer to <a class="el" href="class_node.html" title="Node class. ">Node</a> at the other side of the link. </td></tr>
    <tr><td class="paramname">bandwidth</td><td>Bandwidth of this link, typically in bits per second. </td></tr>
    <tr><td class="paramname">propagationDelay</td><td>Propagation delay of this link, which is medium-dependent, typically in seconds. </td></tr>
    <tr><td class="paramname">simulatorGlobals</td><td>Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object. </td></tr>
    <tr><td class="paramname">scheduler</td><td>Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object. </td></tr>
    <tr><td class="paramname">name</td><td>Name of this link. Default is "". </td></tr>
    <tr><td class="paramname">queueSizeLimit</td><td>The maximum size the transmission queue can reach (default is std::numeric_limits&lt;unsigned int&gt;::max()); if reached, all requests for transmission will be dropped until queue decreases. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00034">34</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;                                                     : <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a>(<a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a>), <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>(<a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>), <a class="code" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>(<a class="code" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>),</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <a class="code" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>(<a class="code" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>), <a class="code" href="class_link.html#a0f55fbe50f26e0c9d0469e3300584870">simulatorGlobals</a>(simulatorGlobals), <a class="code" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a>(scheduler), <a class="code" href="class_link.html#a3175152212d21764b83996c540617838">name</a>(<a class="code" href="class_link.html#a3175152212d21764b83996c540617838">name</a>),</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>(<a class="code" href="class_facility.html">Facility</a>(<span class="stringliteral">&quot;Transmission Server 1-2&quot;</span>, simulatorGlobals, scheduler)), <a class="code" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a>(0) { <span class="comment">// Creates one transmission server (Facility with one server).</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;}</div>
<div class="ttc" id="class_link_html_afc5d6ab142420b803c1f9802ad0199f5"><div class="ttname"><a href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">Link::nodeA</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeA</div><div class="ttdoc">Node at one side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00066">Link.h:66</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_link_html_a3175152212d21764b83996c540617838"><div class="ttname"><a href="class_link.html#a3175152212d21764b83996c540617838">Link::name</a></div><div class="ttdeci">std::string name</div><div class="ttdoc">Name of this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00070">Link.h:70</a></div></div>
<div class="ttc" id="class_link_html_a0f55fbe50f26e0c9d0469e3300584870"><div class="ttname"><a href="class_link.html#a0f55fbe50f26e0c9d0469e3300584870">Link::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00072">Link.h:72</a></div></div>
<div class="ttc" id="class_link_html_a71c43c39d94c9b8b95d1810b5c7d17ac"><div class="ttname"><a href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">Link::droppedPdusCountMedium</a></div><div class="ttdeci">unsigned int droppedPdusCountMedium</div><div class="ttdoc">Count of dropped PDUs by this link&amp;#39;s medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00075">Link.h:75</a></div></div>
<div class="ttc" id="class_link_html_af7a426a53a41d26351c85cb2cea50d60"><div class="ttname"><a href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">Link::nodeB</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeB</div><div class="ttdoc">Node at the other side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00067">Link.h:67</a></div></div>
<div class="ttc" id="class_facility_html"><div class="ttname"><a href="class_facility.html">Facility</a></div><div class="ttdoc">Facility class. </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8h_source.html#l00044">Facility.h:44</a></div></div>
<div class="ttc" id="class_link_html_a31855f1eaf9c6562f1dc2067d475dd4d"><div class="ttname"><a href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">Link::propagationDelay</a></div><div class="ttdeci">double propagationDelay</div><div class="ttdoc">Propagation delay of this link, which is medium-dependent, typically in seconds. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00069">Link.h:69</a></div></div>
<div class="ttc" id="class_link_html_ad60d0e445f4593579b62a3c2ecd1fa75"><div class="ttname"><a href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">Link::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00073">Link.h:73</a></div></div>
<div class="ttc" id="class_link_html_aff4506be6c9b62b335e3a389a01969ef"><div class="ttname"><a href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">Link::bandwidth</a></div><div class="ttdeci">double bandwidth</div><div class="ttdoc">Bandwidth of this link, typically in bits per second. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00068">Link.h:68</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4d8007c08641925ab31385d28cb0f39e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Link::~Link </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00043">43</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;            {</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ab122159183081cdeb5f7b8947f62b9a7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Link::endPropagation </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>PDU has successfully propagated through the link; end propagation. </p>
<p>This function must be called upon handling the event ARRIVAL of PDU at node coming from a link. This is necessary such that the PDU is removed from the inTransitQueue.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pdu</td><td>PDU that is arriving at node and thus has been successfully propagated. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00233">233</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                                                             {</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.remove(pdu); <span class="comment">// Removes the PDU (it should be at head of queue). If not found, does nothing.</span></div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;}</div>
<div class="ttc" id="class_link_html_a53ed79d4f4d927e120d0cbfa00158089"><div class="ttname"><a href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">Link::inTransitQueue</a></div><div class="ttdeci">std::list&lt; std::shared_ptr&lt; const ProtocolDataUnit &gt; &gt; inTransitQueue</div><div class="ttdoc">Queue for PDUs in transit (in propagation) in this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00071">Link.h:71</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2cafc5931128c3a03ac50fa283e9c18f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Link::getBandwidth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return reference to nodeA. </p>
<dl class="section return"><dt>Returns</dt><dd>Reference to <a class="el" href="class_node.html" title="Node class. ">Node</a> at nodeA. Return reference to nodeA.</dd>
<dd>
Reference to <a class="el" href="class_node.html" title="Node class. ">Node</a> at nodeA. Return bandwidth of link.</dd>
<dd>
Bandwidth. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00069">69</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                                {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;}</div>
<div class="ttc" id="class_link_html_aff4506be6c9b62b335e3a389a01969ef"><div class="ttname"><a href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">Link::bandwidth</a></div><div class="ttdeci">double bandwidth</div><div class="ttdoc">Bandwidth of this link, typically in bits per second. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00068">Link.h:68</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af5d1051d4f63ff9018fd4d6f5848dcf1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getDroppedPdusCountMedium </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get count of dropped or discarded PDUs from medium.</p>
<p>A PDU will typically be discarded if the link goes down and there are PDUs in inTransitQueue.</p>
<dl class="section return"><dt>Returns</dt><dd>Count of dropped or discarded PDUs from medium or inTransitQueue. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00314">314</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;                                                   {</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a>;</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;}</div>
<div class="ttc" id="class_link_html_a71c43c39d94c9b8b95d1810b5c7d17ac"><div class="ttname"><a href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">Link::droppedPdusCountMedium</a></div><div class="ttdeci">unsigned int droppedPdusCountMedium</div><div class="ttdoc">Count of dropped PDUs by this link&amp;#39;s medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00075">Link.h:75</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0866e5df549e6c3d83c0247d098d4ab0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getDroppedPdusCountTransmissionServer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get count of dropped or discarded PDUs from transmission server.</p>
<p>A PDU will typically be discarded when the PDU arrives for service and the facility is currently down.</p>
<dl class="section return"><dt>Returns</dt><dd>Count of dropped or discarded PDUs from transmission server. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00302">302</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;                                                               {</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#ac1724d4f29211f7008a14c767f9dc359">getDroppedTokensCount</a>();</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;}</div>
<div class="ttc" id="class_facility_html_ac1724d4f29211f7008a14c767f9dc359"><div class="ttname"><a href="class_facility.html#ac1724d4f29211f7008a14c767f9dc359">Facility::getDroppedTokensCount</a></div><div class="ttdeci">unsigned int getDroppedTokensCount() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00909">Facility.cpp:909</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a194c6afd1182f7543ebd50f859b86123"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getDroppedPdusCountWholeLink </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get count of dropped or discarded PDUs from transmission server and medium.</p>
<p>The sum of dropped PDUs from transmission server and medium.</p>
<dl class="section return"><dt>Returns</dt><dd>Count of dropped or discarded PDUs from transmission server and medium. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00326">326</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;                                                      {</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#ac1724d4f29211f7008a14c767f9dc359">getDroppedTokensCount</a>() + <a class="code" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a>;</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;}</div>
<div class="ttc" id="class_facility_html_ac1724d4f29211f7008a14c767f9dc359"><div class="ttname"><a href="class_facility.html#ac1724d4f29211f7008a14c767f9dc359">Facility::getDroppedTokensCount</a></div><div class="ttdeci">unsigned int getDroppedTokensCount() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00909">Facility.cpp:909</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_link_html_a71c43c39d94c9b8b95d1810b5c7d17ac"><div class="ttname"><a href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">Link::droppedPdusCountMedium</a></div><div class="ttdeci">unsigned int droppedPdusCountMedium</div><div class="ttdoc">Count of dropped PDUs by this link&amp;#39;s medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00075">Link.h:75</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="abb8a206db623b733b98bb5866335b19f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getInTransitQueueSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get current PDU in-transit queue size. </p>
<dl class="section return"><dt>Returns</dt><dd>inTransitQueue size. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00126">126</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                                               {</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.size();</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;}</div>
<div class="ttc" id="class_link_html_a53ed79d4f4d927e120d0cbfa00158089"><div class="ttname"><a href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">Link::inTransitQueue</a></div><div class="ttdeci">std::list&lt; std::shared_ptr&lt; const ProtocolDataUnit &gt; &gt; inTransitQueue</div><div class="ttdoc">Queue for PDUs in transit (in propagation) in this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00071">Link.h:71</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3ae26f20287944d54c2db9d12b56f28d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getMaxRecordedTransmissionQueueSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) max recorded queue size. </p>
<dl class="section return"><dt>Returns</dt><dd>Transmission or underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> max recorded queue size. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00251">251</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;                                                             {</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a6ed30291bca3882e011216265f7d7462">getMaxRecordedQueueSize</a>();</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;}</div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_facility_html_a6ed30291bca3882e011216265f7d7462"><div class="ttname"><a href="class_facility.html#a6ed30291bca3882e011216265f7d7462">Facility::getMaxRecordedQueueSize</a></div><div class="ttdeci">unsigned int getMaxRecordedQueueSize() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00814">Facility.cpp:814</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad0d2091b3406725300be167b82216552"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string Link::getName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return name of link. </p>
<dl class="section return"><dt>Returns</dt><dd>Name as string. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00087">87</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                              {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#a3175152212d21764b83996c540617838">name</a>;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;}</div>
<div class="ttc" id="class_link_html_a3175152212d21764b83996c540617838"><div class="ttname"><a href="class_link.html#a3175152212d21764b83996c540617838">Link::name</a></div><div class="ttdeci">std::string name</div><div class="ttdoc">Name of this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00070">Link.h:70</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af485c0065bf1fdc5c296b45f6ef96fd3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; Link::getNodeA </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return pointer to nodeA (one side of link). </p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to nodeA. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00281">281</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;                                         {</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a>;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;}</div>
<div class="ttc" id="class_link_html_afc5d6ab142420b803c1f9802ad0199f5"><div class="ttname"><a href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">Link::nodeA</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeA</div><div class="ttdoc">Node at one side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00066">Link.h:66</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="adb8020ddc851ceb0bf5dba01182d688c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_node.html">Node</a> &gt; Link::getNodeB </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return pointer to nodeB (another side of link). </p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to nodeB. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00290">290</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;                                         {</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>;</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;}</div>
<div class="ttc" id="class_link_html_af7a426a53a41d26351c85cb2cea50d60"><div class="ttname"><a href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">Link::nodeB</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeB</div><div class="ttdoc">Node at the other side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00067">Link.h:67</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab6f3bcc6896090d2b0ab665c0fedbf17"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Link::getPropagationDelay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return propagation delay or latency of link. </p>
<dl class="section return"><dt>Returns</dt><dd>Propagation delay. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00078">78</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                                       {</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;}</div>
<div class="ttc" id="class_link_html_a31855f1eaf9c6562f1dc2067d475dd4d"><div class="ttname"><a href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">Link::propagationDelay</a></div><div class="ttdeci">double propagationDelay</div><div class="ttdoc">Propagation delay of this link, which is medium-dependent, typically in seconds. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00069">Link.h:69</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a297af435322be39d8562091688c460a7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::list&lt; <a class="el" href="class_facility_queue_element.html">FacilityQueueElement</a> &gt;::size_type Link::getTransmissionQueueSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size. </p>
<dl class="section return"><dt>Returns</dt><dd>Transmission or underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> queue size. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00242">242</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;                                                                            {</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a61f5bb8a3af86066d29dd2eeca3cdd84">getQueueSize</a>();</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;}</div>
<div class="ttc" id="class_facility_html_a61f5bb8a3af86066d29dd2eeca3cdd84"><div class="ttname"><a href="class_facility.html#a61f5bb8a3af86066d29dd2eeca3cdd84">Facility::getQueueSize</a></div><div class="ttdeci">std::list&lt; FacilityQueueElement &gt;::size_type getQueueSize() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00723">Facility.cpp:723</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab93be277b905f1bd1746d649ebb4461d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::getTransmissionQueueSizeLimit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size limit. </p>
<dl class="section return"><dt>Returns</dt><dd>Transmission or underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> queue size limit. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00260">260</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                                                       {</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#ababbaa909332f3c55699721dc087f0c3">getQueueSizeLimit</a>();</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;}</div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_facility_html_ababbaa909332f3c55699721dc087f0c3"><div class="ttname"><a href="class_facility.html#ababbaa909332f3c55699721dc087f0c3">Facility::getQueueSizeLimit</a></div><div class="ttdeci">unsigned int getQueueSizeLimit() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00952">Facility.cpp:952</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa9f5b6b14f9f191421c7e131ccb288ea"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Link::isTransmissionServerBusy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the busy status of this <a class="el" href="class_link.html" title="Link class. ">Link</a>'s transmission server (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>).</p>
<p>The busy status is obtained directly from the underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> (transmission server).</p>
<dl class="section return"><dt>Returns</dt><dd>True if busy, false if non-busy (not necessarily available, however; link might be down). </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00220">220</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                                          {</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a51a7f1911c56425bd1f341b3c2b005e0">isBusy</a>();</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;}</div>
<div class="ttc" id="class_facility_html_a51a7f1911c56425bd1f341b3c2b005e0"><div class="ttname"><a href="class_facility.html#a51a7f1911c56425bd1f341b3c2b005e0">Facility::isBusy</a></div><div class="ttdeci">bool isBusy() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00626">Facility.cpp:626</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3f1d8f13ecc78be10812fa1d78670339"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Link::isUp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return true if link is up; false otherwise. This status is the direct status of underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>Status of link. True if up; false otherwise. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00096">96</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                      {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a648c145304ac37af293458ea11f674c3">isUp</a>();</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_facility_html_a648c145304ac37af293458ea11f674c3"><div class="ttname"><a href="class_facility.html#a648c145304ac37af293458ea11f674c3">Facility::isUp</a></div><div class="ttdeci">bool isUp() const </div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00683">Facility.cpp:683</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a94f1e68ad68a9ebd10fae43a531347d4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83af">LinkReturnType</a> Link::propagatePDU </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>nextEvent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td>
          <td class="paramname"><em>pdu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Ends transmission (release PDU from <a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) and propagate PDU through this link. </p>
<p>First, PDU is released from transmission server. Then, PDU is put into inTransitQueue and an arrival event (typically PDUTOKEN_ARRIVAL_AT_NODE) is scheduled such that the PDU arrives at the destinaton after the propagation delay. If the link is down, the PDU is discarded and statistics, updated. This incident might never happen, since it is likely that no PDU finishes transmission if or after a link is set down.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nextEvent</td><td>Next event to schedule after propagation, typically an arrival event. </td></tr>
    <tr><td class="paramname">pdu</td><td>PDU to propagate.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return type or result of propagation attempt. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00198">198</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;                                                                                                {</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <span class="comment">// Release PDU from transmission Facility.</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#af3c20895dff840f8db94350070360e70">release</a>(pdu);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <span class="comment">// If link is down, discard PDU, update statistics.</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="class_link.html#a3f1d8f13ecc78be10812fa1d78670339">isUp</a>()) {</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        ++<a class="code" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a>;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4">LinkReturnType::LINK_DOWN_PDU_DROPPED</a>;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    }</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <span class="comment">// Otherwise, insert PDU into inTransitQueue and schedule next arrival event.</span></div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.push_back(pdu); <span class="comment">// Insert into queue.</span></div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    <a class="code" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(<a class="code" href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">propagationDelay</a>, nextEvent, pdu));</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa546235efbb1655a5182b7eaf007ac0cc">LinkReturnType::PDU_IN_TRANSIT_NEXT_EVENT_SCHEDULED</a>;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;}</div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_facility_html_af3c20895dff840f8db94350070360e70"><div class="ttname"><a href="class_facility.html#af3c20895dff840f8db94350070360e70">Facility::release</a></div><div class="ttdeci">FacilityReturnType release(std::shared_ptr&lt; const Token &gt; token)</div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00586">Facility.cpp:586</a></div></div>
<div class="ttc" id="class_link_html_a53ed79d4f4d927e120d0cbfa00158089"><div class="ttname"><a href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">Link::inTransitQueue</a></div><div class="ttdeci">std::list&lt; std::shared_ptr&lt; const ProtocolDataUnit &gt; &gt; inTransitQueue</div><div class="ttdoc">Queue for PDUs in transit (in propagation) in this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00071">Link.h:71</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="class_link_html_a3f1d8f13ecc78be10812fa1d78670339"><div class="ttname"><a href="class_link.html#a3f1d8f13ecc78be10812fa1d78670339">Link::isUp</a></div><div class="ttdeci">virtual bool isUp() const </div><div class="ttdoc">Return true if link is up; false otherwise. This status is the direct status of underlying Facility...</div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00096">Link.cpp:96</a></div></div>
<div class="ttc" id="class_link_html_a71c43c39d94c9b8b95d1810b5c7d17ac"><div class="ttname"><a href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">Link::droppedPdusCountMedium</a></div><div class="ttdeci">unsigned int droppedPdusCountMedium</div><div class="ttdoc">Count of dropped PDUs by this link&amp;#39;s medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00075">Link.h:75</a></div></div>
<div class="ttc" id="class_link_html_a31855f1eaf9c6562f1dc2067d475dd4d"><div class="ttname"><a href="class_link.html#a31855f1eaf9c6562f1dc2067d475dd4d">Link::propagationDelay</a></div><div class="ttdeci">double propagationDelay</div><div class="ttdoc">Propagation delay of this link, which is medium-dependent, typically in seconds. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00069">Link.h:69</a></div></div>
<div class="ttc" id="class_link_html_ad60d0e445f4593579b62a3c2ecd1fa75"><div class="ttname"><a href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">Link::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00073">Link.h:73</a></div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa546235efbb1655a5182b7eaf007ac0cc"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa546235efbb1655a5182b7eaf007ac0cc">LinkReturnType::PDU_IN_TRANSIT_NEXT_EVENT_SCHEDULED</a></div><div class="ttdoc">PDU is in transit within link medium (and within inTransitQueue). </div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4">LinkReturnType::LINK_DOWN_PDU_DROPPED</a></div><div class="ttdoc">Link is down. PDU was dropped (or enqueued, depending on the implementation of function Facility::req...</div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa2abd35db916156b8204655f89df6e3a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::purgeQueue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Purge inTransitQueue, update statistics, return number of dropped PDUs from link medium. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of PDUs dropped from inTransitQueue. </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00335">335</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;                              {</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    <span class="comment">// Drop each PDU in inTransitQueue and update statistics.</span></div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> droppedPdusHere = <a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.size(); <span class="comment">// PDUs dropped from link medium, in transit queue.</span></div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    <span class="keywordflow">while</span> (<a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.size() &gt; 0) {</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        <a class="code" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a>.<a class="code" href="class_scheduler.html#ac09d9f9b4147c949268fa6bc66ced974">removeEvents</a>(<a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.front()); <span class="comment">// Delete events related to first PDU.</span></div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        <a class="code" href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">inTransitQueue</a>.pop_front(); <span class="comment">// Remove first PDU.</span></div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    }</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;    <a class="code" href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">droppedPdusCountMedium</a> += droppedPdusHere; <span class="comment">// Update member counter for dropped PDUs in link medium.</span></div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;    <span class="keywordflow">return</span> droppedPdusHere;</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;}</div>
<div class="ttc" id="class_scheduler_html_ac09d9f9b4147c949268fa6bc66ced974"><div class="ttname"><a href="class_scheduler.html#ac09d9f9b4147c949268fa6bc66ced974">Scheduler::removeEvents</a></div><div class="ttdeci">unsigned int removeEvents(std::shared_ptr&lt; const Entity &gt; entity)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00118">Scheduler.cpp:118</a></div></div>
<div class="ttc" id="class_link_html_a53ed79d4f4d927e120d0cbfa00158089"><div class="ttname"><a href="class_link.html#a53ed79d4f4d927e120d0cbfa00158089">Link::inTransitQueue</a></div><div class="ttdeci">std::list&lt; std::shared_ptr&lt; const ProtocolDataUnit &gt; &gt; inTransitQueue</div><div class="ttdoc">Queue for PDUs in transit (in propagation) in this link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00071">Link.h:71</a></div></div>
<div class="ttc" id="class_link_html_a71c43c39d94c9b8b95d1810b5c7d17ac"><div class="ttname"><a href="class_link.html#a71c43c39d94c9b8b95d1810b5c7d17ac">Link::droppedPdusCountMedium</a></div><div class="ttdeci">unsigned int droppedPdusCountMedium</div><div class="ttdoc">Count of dropped PDUs by this link&amp;#39;s medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00075">Link.h:75</a></div></div>
<div class="ttc" id="class_link_html_ad60d0e445f4593579b62a3c2ecd1fa75"><div class="ttname"><a href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">Link::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00073">Link.h:73</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="afe69b641a7b52cdc830307dfcd9e8af3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::setDown </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set <a class="el" href="class_link.html" title="Link class. ">Link</a> down. </p>
<p>Sets the underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> down. <a class="el" href="class_link.html" title="Link class. ">Link</a>'s transmission server statistics and status are controlled by this facility. Drops both PDUs in transmission and PDUs in transit through link medium. </p>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00117">117</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                           {</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a0f7671f75b0309c520692c2a210e734e">setDown</a>() + <a class="code" href="class_link.html#aa2abd35db916156b8204655f89df6e3a">purgeQueue</a>();</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;}</div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_link_html_aa2abd35db916156b8204655f89df6e3a"><div class="ttname"><a href="class_link.html#aa2abd35db916156b8204655f89df6e3a">Link::purgeQueue</a></div><div class="ttdeci">unsigned int purgeQueue()</div><div class="ttdoc">Purge inTransitQueue, update statistics, return number of dropped PDUs from link medium. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8cpp_source.html#l00335">Link.cpp:335</a></div></div>
<div class="ttc" id="class_facility_html_a0f7671f75b0309c520692c2a210e734e"><div class="ttname"><a href="class_facility.html#a0f7671f75b0309c520692c2a210e734e">Facility::setDown</a></div><div class="ttdeci">unsigned int setDown()</div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00711">Facility.cpp:711</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af64db4e49ef26c305b301db2ae318244"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Link::setTransmissionQueueSizeLimit </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>limit</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size limit. </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000014">Todo:</a></b></dt><dd>must return dropped PDUs here. </dd></dl>
<p>If not set, the default here is the default inherited from <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> class (&lt;double&gt;max()).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">limit</td><td>Transmission (<a class="el" href="class_facility.html" title="Facility class. ">Facility</a>) queue size limit. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00272">272</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;                                                           {</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a4d8bbec743dae89da983619eedb2e129">setQueueSizeLimit</a>(limit);</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;}</div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_facility_html_a4d8bbec743dae89da983619eedb2e129"><div class="ttname"><a href="class_facility.html#a4d8bbec743dae89da983619eedb2e129">Facility::setQueueSizeLimit</a></div><div class="ttdeci">void setQueueSizeLimit(unsigned int limit)</div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00938">Facility.cpp:938</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a57170d6e8669a32107794b0a2cc98890"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Link::setUp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set <a class="el" href="class_link.html" title="Link class. ">Link</a> up. </p>
<p>Sets the underlying <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> up. <a class="el" href="class_link.html" title="Link class. ">Link</a>'s transmission server statistics and status are controlled by this facility. </p>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00106">106</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                 {</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#a9cf2c05d0966a731a8a9d9157a13df5e">setUp</a>();</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;}</div>
<div class="ttc" id="class_facility_html_a9cf2c05d0966a731a8a9d9157a13df5e"><div class="ttname"><a href="class_facility.html#a9cf2c05d0966a731a8a9d9157a13df5e">Facility::setUp</a></div><div class="ttdeci">void setUp()</div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00699">Facility.cpp:699</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aeba26f0ab710ff765646e669a60ac682"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83af">LinkReturnType</a> Link::transmitPDU </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>transmitEventType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>endTransmitEventType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td>
          <td class="paramname"><em>pdu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Requests transmission a PDU to (or through) the link. </p>
<p>The transmission is the first step in fully moving one PDU from the source node to a destination node connected by a link. The transmission puts the PDU into the link medium. After transmission, the PDU must then propagate through the link medium until reaching the destination node.</p>
<p>The link is modelled with a <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> with one server, acting as the transmission server. The service time is a function of the link bandwidth and PDU size, such that:</p>
<p>service_time = PDU_size / bandwidth</p>
<p>Connected to the output of the transmission server, there is a delay center or infinite capacity server. This delay center models the propagation delay of the link. The complete handling of a PDU through a link will be composed of three events:</p>
<ol type="1">
<li>REQUEST_PDU_TRANSMISSION_AT_LINK: if successful, the next END_TRANSMISSION_PROPAGATE_PDU_AT_LINK event must be scheduled for the link. Otherwise, the PDU was probably enqueued or dropped.</li>
<li>END_TRANSMISSION_PROPAGATE_PDU_AT_LINK: if the previous event was successful, this event is scheduled. This event will cause the <a class="el" href="class_link.html" title="Link class. ">Link</a> transmission server to release the PDU and then the PDU will commence propagation in the link. This is done by scheduling a PDUTOKEN_ARRIVAL_AT_NODE after the fixed-time propagation delay.</li>
<li>PDUTOKEN_ARRIVAL_AT_NODE: scheduled after transmission and release of PDU from <a class="el" href="class_link.html" title="Link class. ">Link</a>'s transmission server. At this event, the PDU has arrived at the destination node.</li>
</ol>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">transmitEventType</td><td>Type of event to schedule for transmission. If PDU is enqueued, this event will be used by <a class="el" href="class_facility.html" title="Facility class. ">Facility</a> class. </td></tr>
    <tr><td class="paramname">endTransmitEventType</td><td>Type of event to schedule for after transmission, typically a release/propagation event. </td></tr>
    <tr><td class="paramname">pdu</td><td>Protocol Data Unit to transmit.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return type or result of transmission request. </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000011">Todo:</a></b></dt><dd>Update link or node statistics here! </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000012">Todo:</a></b></dt><dd>Update link or node statistics here! </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000013">Todo:</a></b></dt><dd>Return value here? </dd></dl>

<p>Definition at line <a class="el" href="_link_8cpp_source.html#l00157">157</a> of file <a class="el" href="_link_8cpp_source.html">Link.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;                                                                                                                                       {</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="comment">// Consistency check. If nodes in PDU&#39;s previous and next fields are not connected by this node, then refuse transmission and return error state.</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keywordflow">if</span> (pdu-&gt;previous != <a class="code" href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">nodeA</a> || pdu-&gt;next != <a class="code" href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">nodeB</a>) {</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3">LinkReturnType::ERROR_LINK_DOES_NOT_CONNECT_NODES</a>;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    }</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordtype">double</span> transmissionTime = pdu-&gt;getPduSize() * 8.0 / <a class="code" href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">bandwidth</a>; <span class="comment">// Converts PDU size to bits and calculates transmission time based on bandwidth.</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="comment">// Request service for PDU at Facility (transmission server).</span></div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <a class="code" href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72c">FacilityReturnType</a> serviceRequestResult = <a class="code" href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">transmissionServer</a>.<a class="code" href="class_facility.html#ad8579e469df0909ad36ee6b0719a2173">request</a>(pdu, transmitEventType);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="comment">// Test outcomes.</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="keywordflow">if</span> (serviceRequestResult == <a class="code" href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca748fbb782cdc23671570937bca42c031">FacilityReturnType::TOKEN_PUT_IN_SERVICE</a>) {</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <a class="code" href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(transmissionTime, endTransmitEventType, pdu)); <span class="comment">// Successful; schedule next event to release/propagate.</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afacd81b4be909430d796a08b373c59d714">LinkReturnType::PDU_IN_TRANSMISSION_NEXT_EVENT_SCHEDULED</a>;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (serviceRequestResult == <a class="code" href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca29752595827eef50aabead37d4eb7761">FacilityReturnType::FACILITY_BUSY_QUEUE_FULL_TOKEN_DROPPED</a>) { <span class="comment">// Facility queue full, PDU was dropped; update statistics.</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="comment"></span>        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa9b52d9f68401bbcbaba5dc65b99898d1">LinkReturnType::LINK_BUSY_QUEUE_FULL_PDU_DROPPED</a>;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (serviceRequestResult == <a class="code" href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72caeccec682378d2895857cde4b04dd58e1">FacilityReturnType::FACILITY_DOWN_TOKEN_DROPPED</a>) { <span class="comment">// Facility down (thus link is also down); PDU dropped, update stats of Node?</span></div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="comment"></span>        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4">LinkReturnType::LINK_DOWN_PDU_DROPPED</a>;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (serviceRequestResult == <a class="code" href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca9eabb9b43310855334df811fd9c79748">FacilityReturnType::FACILITY_BUSY_TOKEN_ENQUEUED</a>) { <span class="comment">// Facility busy, token enqueued. Nothing else to do.</span></div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa22ccb03889f70235c3d563f564d204c6">LinkReturnType::LINK_BUSY_PDU_ENQUEUED</a>;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa3e860a081575fc82cc7b6ed2ca602947">LinkReturnType::NOT_IMPLEMENTED</a>; <span class="comment">// Something weird happened...</span></div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    }</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;}</div>
<div class="ttc" id="_facility_return_type_8h_html_a4ebe26bb7c3ad3b1926de74522fcc72caeccec682378d2895857cde4b04dd58e1"><div class="ttname"><a href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72caeccec682378d2895857cde4b04dd58e1">FacilityReturnType::FACILITY_DOWN_TOKEN_DROPPED</a></div><div class="ttdoc">Facility is down. Token was dropped (or enqueued, depending on the implementation of function Facilit...</div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa9b52d9f68401bbcbaba5dc65b99898d1"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa9b52d9f68401bbcbaba5dc65b99898d1">LinkReturnType::LINK_BUSY_QUEUE_FULL_PDU_DROPPED</a></div><div class="ttdoc">The queue is full (has reached the imposed limit); PDU for which service was requested was dropped...</div></div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_link_html_afc5d6ab142420b803c1f9802ad0199f5"><div class="ttname"><a href="class_link.html#afc5d6ab142420b803c1f9802ad0199f5">Link::nodeA</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeA</div><div class="ttdoc">Node at one side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00066">Link.h:66</a></div></div>
<div class="ttc" id="class_link_html_abe44953f8653b44f2b914daa0bb6bcdc"><div class="ttname"><a href="class_link.html#abe44953f8653b44f2b914daa0bb6bcdc">Link::transmissionServer</a></div><div class="ttdeci">Facility transmissionServer</div><div class="ttdoc">Transmission server for this Link (one-way). </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00074">Link.h:74</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="_facility_return_type_8h_html_a4ebe26bb7c3ad3b1926de74522fcc72ca29752595827eef50aabead37d4eb7761"><div class="ttname"><a href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca29752595827eef50aabead37d4eb7761">FacilityReturnType::FACILITY_BUSY_QUEUE_FULL_TOKEN_DROPPED</a></div><div class="ttdoc">The queue is full (has reached the imposed limit); token for which service was requested was dropped...</div></div>
<div class="ttc" id="class_facility_html_ad8579e469df0909ad36ee6b0719a2173"><div class="ttname"><a href="class_facility.html#ad8579e469df0909ad36ee6b0719a2173">Facility::request</a></div><div class="ttdeci">FacilityReturnType request(std::shared_ptr&lt; const Token &gt; token, EventType eventType)</div><div class="ttdef"><b>Definition:</b> <a href="_facility_8cpp_source.html#l00231">Facility.cpp:231</a></div></div>
<div class="ttc" id="_facility_return_type_8h_html_a4ebe26bb7c3ad3b1926de74522fcc72ca748fbb782cdc23671570937bca42c031"><div class="ttname"><a href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca748fbb782cdc23671570937bca42c031">FacilityReturnType::TOKEN_PUT_IN_SERVICE</a></div><div class="ttdoc">Token was successfuly put in service by facility. </div></div>
<div class="ttc" id="class_link_html_af7a426a53a41d26351c85cb2cea50d60"><div class="ttname"><a href="class_link.html#af7a426a53a41d26351c85cb2cea50d60">Link::nodeB</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; nodeB</div><div class="ttdoc">Node at the other side of the link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00067">Link.h:67</a></div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa3e860a081575fc82cc7b6ed2ca602947"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa3e860a081575fc82cc7b6ed2ca602947">LinkReturnType::NOT_IMPLEMENTED</a></div><div class="ttdoc">This function has not been implemented yet. </div></div>
<div class="ttc" id="class_link_html_ad60d0e445f4593579b62a3c2ecd1fa75"><div class="ttname"><a href="class_link.html#ad60d0e445f4593579b62a3c2ecd1fa75">Link::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00073">Link.h:73</a></div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa22ccb03889f70235c3d563f564d204c6"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa22ccb03889f70235c3d563f564d204c6">LinkReturnType::LINK_BUSY_PDU_ENQUEUED</a></div><div class="ttdoc">Link (transmission server) was busy; PDU was enqueued. </div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa1540ac8eab2f22bb0c7e66c69ff50dc3">LinkReturnType::ERROR_LINK_DOES_NOT_CONNECT_NODES</a></div><div class="ttdoc">The nodes within PDU&amp;#39;s previous and next fields are not connected through this link. PDU cannot travel here (inconsistency). </div></div>
<div class="ttc" id="class_link_html_aff4506be6c9b62b335e3a389a01969ef"><div class="ttname"><a href="class_link.html#aff4506be6c9b62b335e3a389a01969ef">Link::bandwidth</a></div><div class="ttdeci">double bandwidth</div><div class="ttdoc">Bandwidth of this link, typically in bits per second. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8h_source.html#l00068">Link.h:68</a></div></div>
<div class="ttc" id="_facility_return_type_8h_html_a4ebe26bb7c3ad3b1926de74522fcc72ca9eabb9b43310855334df811fd9c79748"><div class="ttname"><a href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72ca9eabb9b43310855334df811fd9c79748">FacilityReturnType::FACILITY_BUSY_TOKEN_ENQUEUED</a></div><div class="ttdoc">Facility was busy; token was enqueued. </div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afacd81b4be909430d796a08b373c59d714"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afacd81b4be909430d796a08b373c59d714">LinkReturnType::PDU_IN_TRANSMISSION_NEXT_EVENT_SCHEDULED</a></div><div class="ttdoc">PDU was successfully put into transmission (serviced) at Link. </div></div>
<div class="ttc" id="_link_return_type_8h_html_a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4"><div class="ttname"><a href="_link_return_type_8h.html#a554ed4dd9752dfafac386b42493b83afa0bec40bfb1c3fa48c0a7b3b5817508f4">LinkReturnType::LINK_DOWN_PDU_DROPPED</a></div><div class="ttdoc">Link is down. PDU was dropped (or enqueued, depending on the implementation of function Facility::req...</div></div>
<div class="ttc" id="_facility_return_type_8h_html_a4ebe26bb7c3ad3b1926de74522fcc72c"><div class="ttname"><a href="_facility_return_type_8h.html#a4ebe26bb7c3ad3b1926de74522fcc72c">FacilityReturnType</a></div><div class="ttdeci">FacilityReturnType</div><div class="ttdoc">Facility Return Type enum class. </div><div class="ttdef"><b>Definition:</b> <a href="_facility_return_type_8h_source.html#l00028">FacilityReturnType.h:28</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="aff4506be6c9b62b335e3a389a01969ef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Link::bandwidth</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Bandwidth of this link, typically in bits per second. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00068">68</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="a71c43c39d94c9b8b95d1810b5c7d17ac"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Link::droppedPdusCountMedium</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Count of dropped PDUs by this link's medium. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00075">75</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="a53ed79d4f4d927e120d0cbfa00158089"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::list&lt;std::shared_ptr&lt;const <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a>&gt; &gt; Link::inTransitQueue</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Queue for PDUs in transit (in propagation) in this link. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00071">71</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3175152212d21764b83996c540617838"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string Link::name</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Name of this link. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00070">70</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="afc5d6ab142420b803c1f9802ad0199f5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="class_node.html">Node</a>&gt; Link::nodeA</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="class_node.html" title="Node class. ">Node</a> at one side of the link. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00066">66</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="af7a426a53a41d26351c85cb2cea50d60"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="class_node.html">Node</a>&gt; Link::nodeB</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="class_node.html" title="Node class. ">Node</a> at the other side of the link. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00067">67</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="a31855f1eaf9c6562f1dc2067d475dd4d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double Link::propagationDelay</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Propagation delay of this link, which is medium-dependent, typically in seconds. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00069">69</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="ad60d0e445f4593579b62a3c2ecd1fa75"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_scheduler.html">Scheduler</a>&amp; Link::scheduler</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00073">73</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0f55fbe50f26e0c9d0469e3300584870"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a>&amp; Link::simulatorGlobals</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object. </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00072">72</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<a class="anchor" id="abe44953f8653b44f2b914daa0bb6bcdc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_facility.html">Facility</a> Link::transmissionServer</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Transmission server for this <a class="el" href="class_link.html" title="Link class. ">Link</a> (one-way). </p>

<p>Definition at line <a class="el" href="_link_8h_source.html#l00074">74</a> of file <a class="el" href="_link_8h_source.html">Link.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>QcnSim/<a class="el" href="_link_8h_source.html">Link.h</a></li>
<li>QcnSim/<a class="el" href="_link_8cpp_source.html">Link.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Nov 14 2013 11:18:23 for QCNSim by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
